package com.yima.baseproj.config.application;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 使用方法：AppUtil.baseurl
 * @Author 一码
 * @createDate 2023/4/1 09:00
 * @contact 1424529270@qq.com
 */
@Component
public class ApplicationUtil {

    public static String baseUrl = ""; //基础路径

    public static String uploadLocalPath = "";//上传本地路径

    public static String uploadWebBasepath = "";//上传网络基础路径

    @Value("${baseUrl}")
    public void setBaseUrl(String baseUrl) {
        ApplicationUtil.baseUrl = baseUrl;
    }
    @Value("${upload.localPath}")
    public void setUploadLocalPath(String uploadLocalPath) {
        ApplicationUtil.uploadLocalPath = uploadLocalPath;
    }
    @Value("${upload.webBasePath}")
    public void setUploadWebbasepath(String uploadWebbasepath) {
        ApplicationUtil.uploadWebBasepath = uploadWebbasepath;
    }
}
